﻿@using MvcAtletIS.Helpers;
@model IEnumerable<MvcAtletIS.Models.CheckPoints>

@{
    ViewBag.Title = "Check-pointy";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Check-pointy: @ViewBag.DisciplineList.Name</h2>


<table>
    <tr>
        <th width="50px">
            Poradie
        </th>
        <th width="300px">
            Názov
        </th>
        <th width="50px">
            Kód
        </th>
        <th width="50px">
            PC ID
        </th>
        <th width="50px">
            Prechod
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td align="center">
            @Html.DisplayFor(modelItem => item.OrderInDiscipline)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.Code)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.PcId)
        </td>
        <td align="center">
            @Html.DisplayFor(modelItem => item.LapCount)
        </td>
        <td>
            @Html.ImageActionLink(Url.Content("~/Content/icons/preview.gif"), "", "Details", new { id = item.ID }, new { title = "Zobraziť", border = 0, hspace = 2 }) |
            @Html.ImageActionLink(Url.Content("~/Content/icons/edit.gif"), "", "Edit", new { id = item.ID }, new { title = "Editovať", border = 0, hspace = 2 }) |
            @Html.ImageActionLink(Url.Content("~/Content/icons/delete.gif"), "", "Delete", new { id = item.ID }, new { title = "Zmazať", border = 0, hspace = 2 })
        </td>
    </tr>
}

</table>

<p>
    @Html.ActionLink("Pridať", "Create", new { disciplineListId = ViewBag.DisciplineList.ID}) |
    @Html.ActionLink("Naspäť na zoznam disciplín", "Index", "DisciplineList", new {competitionId = ViewBag.DisciplineList.CompetitionId}, null)
</p>
